Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix table existence validation function #11066

Merged
merged 3 commits into from
Sep 29, 2020

Conversation

bkyryliuk
Copy link
Member

@bkyryliuk bkyryliuk commented Sep 25, 2020

SUMMARY

  • fixes table validation in API
  • drops incorrect unique constraint for the mysql db [ probably a miss ]

TEST PLAN

  • unit tests

@bkyryliuk bkyryliuk marked this pull request as draft September 25, 2020 17:00
@bkyryliuk bkyryliuk force-pushed the bogdan/fix_create_dataset branch 3 times, most recently from ddd61a5 to 65cb654 Compare September 25, 2020 21:27
@bkyryliuk bkyryliuk force-pushed the bogdan/fix_create_dataset branch from 65cb654 to 76f1e1c Compare September 25, 2020 21:31
@bkyryliuk bkyryliuk changed the title fix: fix table existence validation function [WIP] fix: fix table existence validation function Sep 25, 2020
@@ -453,7 +453,7 @@ class SqlaTable( # pylint: disable=too-many-public-methods,too-many-instance-at
owner_class = security_manager.user_model

__tablename__ = "tables"
__table_args__ = (UniqueConstraint("database_id", "table_name"),)
__table_args__ = (UniqueConstraint("database_id", "schema", "table_name"),)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@john-bodley - do you know if there are any issues with changing table_args here?

Copy link
Member

@john-bodley john-bodley Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkyryliuk this will not work per #5449.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @john-bodley, reverted this line

@bkyryliuk bkyryliuk marked this pull request as ready for review September 28, 2020 21:24
Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good enough solution, given the constraints.

@bkyryliuk bkyryliuk merged commit 03eebd3 into apache:master Sep 29, 2020
@bkyryliuk bkyryliuk deleted the bogdan/fix_create_dataset branch September 29, 2020 22:01
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants